-- GENERATED SPELL FOR [Ysondre] --


function spell0_14887(pUnit, Event) --@Lightning Wave,n/a--
pUnit:FullCastSpellOnTarget(24819,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14887', 674, 1)
end

function spell1_14887(pUnit, Event) --@Noxious Breath,Self--
pUnit:FullCastSpellOnTarget(24818,pUnit)
pUnit:RegisterEvent('Sorts_14887', 30000, 1)
end

function spell2_14887(pUnit, Event) --@Seeping Fog,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24813,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14887', 1, 1)
end

function spell3_14887(pUnit, Event) --@Seeping Fog,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24814,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14887', 1, 1)
end

function spell4_14887(pUnit, Event) --@Summon Player,n/a--
pUnit:FullCastSpellOnTarget(24776,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14887', 285, 1)
end

function spell5_14887(pUnit, Event) --@Tail Sweep,n/a--
pUnit:FullCastSpellOnTarget(15847,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14887', 601, 1)
end

function Sorts_14887(pUnit, Event)
local choix_sorts_14887 = math.random(0, 5)
if choix_sorts_14887 == 0 then
pUnit:RegisterEvent('spell0_14887', 1, 1)
end
if choix_sorts_14887 == 1 then
pUnit:RegisterEvent('spell1_14887', 1, 1)
end
if choix_sorts_14887 == 2 then
pUnit:RegisterEvent('spell2_14887', 1, 1)
end
if choix_sorts_14887 == 3 then
pUnit:RegisterEvent('spell3_14887', 1, 1)
end
if choix_sorts_14887 == 4 then
pUnit:RegisterEvent('spell4_14887', 1, 1)
end
if choix_sorts_14887 == 5 then
pUnit:RegisterEvent('spell5_14887', 1, 1)
end
end

function mob14887_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14887', math.random(1500, 3000), 1)
end

function mob14887_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14887_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14887_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14887, 1, 'mob14887_Action')
RegisterUnitEvent(14887, 2, 'mob14887_Leave')
RegisterUnitEvent(14887, 3, 'mob14887_Kill')
RegisterUnitEvent(14887, 4, 'mob14887_Die')
